package gold.digger;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by fanzhenyu02 on 2020/6/27.
 * common problem solver template.
 */
public class LC553 {
    public long startExecuteTime = System.currentTimeMillis();


    class Solution {
        public String optimalDivision(int[] nums) {
            StringBuilder res = new StringBuilder();
            res.append(nums[0]);
            if (nums.length == 1) return res.toString();
            if (nums.length == 2) {
                res.append('/').append(nums[1]);
                return res.toString();
            }
            res.append("/(");
            for (int i = 1; i < nums.length - 1; i++) {
                res.append(nums[i]).append('/');
            }
            res.append(nums[nums.length - 1]).append(')');
            return res.toString();
        }
    }

    public void run() {
        Solution solution = new Solution();
        List<Integer> list = new ArrayList<>();
        System.out.println(solution.toString());
    }

    public static void main(String[] args) throws Exception {
        LC553 an = new LC553();
        an.run();

        System.out.println("\ncurrent solution total execute time: " + (System.currentTimeMillis() - an.startExecuteTime) + " ms.");
    }
}
